#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <thread>
#include <future>
#include <iostream>
#include <atomic>
#include "NetWork/CSerialPort.h"
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
signals:
    void read();
private:
    Ui::MainWindow *ui;
    std::future<void> readFuture;
    std::atomic<bool> isRead=false;

    CSerialPort cs;

};

#endif // MAINWINDOW_H
